'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url admin/pages/kh/dsjzxgl/dsjfjgl/update_appid 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		const db = uniCloud.database();

		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, _ } = util;
		let { uid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		//把所有剧集的appid重置为空数组。适用于老版本升级【推荐视频分不同小程序展示】的功能
		res.up = await db.collection('a_tv_series').where({
			series: _.gt(0)
		}).update({
			appid: [],
			appname: []
		})

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
